home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / cmdline.lha / cmdline / Config.mk next >
Text File  |  1993-04-13  |  5KB  |  202 lines

  1. ##########################################################################
  2. ## ^FILE: Config.mk - configuration flags for the CmdLine product
  3. ##
  4. ## ^DESCRIPTION:
  5. ##    This file is included in each makefile in the directory hierarchy.
  6. ##    It defines the Make macros used throughout the product build process.
  7. ##    These values represent the global defaults. At any level you run make,
  8. ##    you may override any of these by specifying a new value on the command
  9. ##    line.
  10. ##
  11. ## ^HISTORY:
  12. ##    04/28/92    Brad Appleton    <brad@ssd.csd.harris.com>    Created
  13. ###^^#####################################################################
  14.  
  15.    ## Universe to compile in (use "att" for SYSV Unix and "ucb" for BSD Unix).
  16. .UNIVERSE=att
  17.  
  18.    ## Host operating system
  19. OS=unix
  20.  
  21. #------------------------------------------------------------------------------
  22. # Define some OS dependent stuff for file extensions
  23. #
  24.    ## C++ file extension
  25. CEXT=.c
  26.  
  27.    ## object file extension
  28. OBJEXT=.o
  29.  
  30.    ## library file extension
  31. LIBEXT=.a
  32.  
  33.    ## executable file extension
  34. EXECEXT=
  35.  
  36. #------------------------------------------------------------------------------
  37. # Define some OS dependent stuff for directory names
  38. #
  39.    ## current working directory
  40. CURDIR=./
  41.  
  42.    ## parent of current working directory
  43. PARENTDIR=../
  44.  
  45. #------------------------------------------------------------------------------
  46. # Define some common commands
  47. #
  48.    ## remove files
  49. RM=rm -f
  50.  
  51.    ## remove directories
  52. RMDIR=rm -rf
  53.  
  54.    ## create directories
  55. MKDIR=mkdir -p
  56.  
  57.    ## change directories
  58. CHDIR=cd
  59.  
  60.    ## echo current directory
  61. PWD=pwd
  62.  
  63.    ## print to standard output
  64. ECHO=echo
  65.  
  66.    ## copy files
  67. CP=cp
  68.  
  69.    ## move/rename files
  70. MV=mv
  71.  
  72.    ## print file on standard output
  73. CAT=cat
  74.  
  75.    ## maintain archives
  76. AR=ar r
  77.  
  78.    ## maintain library archives
  79. RANLIB=ranlib
  80.  
  81.    ## remove symbol table info
  82. STRIP=strip
  83.  
  84.    ## filter to remove non-ascii characters
  85. COL=col -xb
  86.  
  87.    ## eliminate includes from a manpage
  88. SOELIM=soelim
  89.  
  90.    ## compress a manpage
  91. MANTOCATMAN=mantocatman
  92.  
  93.    ## print docs on printer
  94. TROFF=roff -man
  95.  
  96.    ## print docs to screen
  97. NROFF=nroff -man
  98.  
  99.    ## spell-checker
  100. SPELL=spell
  101.  
  102. #------------------------------------------------------------------------------
  103. # Define some target directories (where things are installed)
  104. #
  105. #    NOTE: if you change BINDIR, INCDIR, or LIBDIR then dont forget to change
  106. #          their corresponding strings at the end of doc/macros.man!
  107. #
  108.    ## common local directory
  109. LOCAL=/usr/local/
  110.  
  111.    ## where to install executables
  112. BINDIR=$(LOCAL)bin/
  113.  
  114.    ## where to install object libraries
  115. LIBDIR=$(LOCAL)lib/
  116.  
  117.    ## where to install object include files
  118. INCDIR=$(LOCAL)include/
  119.  
  120.    ## where to install perl libraries
  121. PERLLIB=$(LIBDIR)perl/
  122.  
  123.    ## where to install tcl libraries
  124. TCLLIB=$(LIBDIR)tcl/
  125.  
  126.    ## subdirectory where local man-pages are installed
  127. LOCALMAN=local_man/
  128.  
  129.    ## where to install man-pages
  130. MANDIR=/usr/man/$(LOCALMAN)
  131.  
  132.    ## where to install catman-pages (preformatted manual pages)
  133. CATMANDIR=/usr/catman/$(LOCALMAN)
  134.  
  135.    ## subdirectory of MANDIR and CATMANDIR for section 1 of man-pages
  136. MAN1DIR=man1/
  137.  
  138.    ## subdirectory of MANDIR and CATMANDIR for section 3 of man-pages
  139. MAN3DIR=man3/
  140.  
  141. #------------------------------------------------------------------------------
  142. # Define some product specific stuff
  143. #
  144. PROGLIBDIR=$(PARENTDIR)lib/
  145. PROGNAME=cmdparse
  146. LIBNAME=cmdline
  147.  
  148. #------------------------------------------------------------------------------
  149. # Define C++ compilation stuff
  150. #
  151.    ## name of C++ compiler
  152. CC=CC
  153.  
  154.    ## option to specify other include directories to search
  155. INC=-I
  156.  
  157.    ## option to specify constants to #define
  158. DEF=-D
  159.  
  160.    ## option to produce optimized code
  161. OPT=-O
  162.  
  163.    ## option to produce debugging information
  164. DBG=-g
  165.  
  166.    ## option to indicate the name of the executable file
  167. EXE=-o 
  168.  
  169.    ## option to suppress the loading phase
  170. NOLD=-c
  171.  
  172. #------------------------------------------------------------------------------
  173. # Define rules for C++ files
  174. #
  175. .SUFFIXES : $(CEXT) $(OBJEXT)
  176.  
  177. $(CEXT)$(OBJEXT):
  178.     $(CC) $(CFLAGS) $(NOLD) $<
  179.  
  180. #------------------------------------------------------------------------------
  181. # Define some configurable compilation flags
  182. #
  183. FLAG=$(OPT)
  184. # FLAG=$(DBG)
  185. TESTDEFS=
  186. USRDEFS=$(DEF)DEBUG_CMDLINE
  187. OPTIONS=
  188.  
  189. #------------------------------------------------------------------------------
  190. # Define the macro to pass to recursive makes
  191. #
  192. RECUR= "FLAG=$(FLAG)" \
  193.    "TESTDEFS=$(TESTDEFS)" \
  194.    "USRDEFS=$(USRDEFS)" \
  195.    "OPTIONS=$(OPTIONS)"
  196.  
  197. #------------------------------------------------------------------------------
  198. # Define the command for recursive makes
  199. #
  200. BUILD=$(MAKE) -$(MAKEFLAGS) $(RECUR)
  201.  
  202.